home *** CD-ROM | disk | FTP | other *** search
- /*
- File: DragInit.cpp
-
- Contains: Init routines for DragText part
-
- Owned by: Eric House
-
- Copyright: © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <2> 5/24/96 jpa 1246074: Call Mwerks init/terminate fns for
- native exceptions.
-
- To Do:
- In Progress:
-
- */
-
-
- /* #include <somcls.xh> */
- #include <som.xh>
- #include <somobj.xh>
-
- #ifndef _ALTPOINT_
- #include <AltPoint.h>
- #endif
-
- #ifndef _USERSRCM_
- #include <UseRsrcM.h>
- #endif
-
- #ifndef _ODMEMORY_
- #include <ODMemory.h>
- #endif
-
- #ifndef SOM_AppleTestDrag_DragText_xh
- #include "DragText.xh"
- #endif
-
-
- #ifdef __MWERKS__
- extern "C" {
- void __initialize(); // From Metrowerks runtime library, Startup.c
- void __terminate();
- }
- #endif
-
-
- extern "C" pascal OSErr DragTextCFMInit (CFragInitBlockPtr initBlkPtr);
- extern "C" pascal void DragTextCFMTerminate( );
-
- pascal OSErr DragTextCFMInit (CFragInitBlockPtr initBlkPtr)
- {
- #ifdef __MWERKS__
- __initialize(); // Initialize static data and construct any global objects
- #endif
- OSErr err;
- if( (err=InitODMemory()) != noErr ) return err;
- return InitLibraryResources(initBlkPtr);
- }
-
- pascal void DragTextCFMTerminate( )
- {
- CloseLibraryResources();
- #ifdef __MWERKS__
- __terminate(); // Destruct static objects & clean up exception tables
- #endif
- }
-